﻿using System;
using System.Collections.Generic;
using UnityEngine;

namespace UFrame
{
    /// <summary>
    /// 1. 测试分顺序测试
    /// 2. 随机测试
    /// </summary>
    [Serializable]
    public class AutoTestGroup : MonoBehaviour
    {
        public int id;
        public List<AutoTestInput> randomTestList = new List<AutoTestInput>();
        public List<string> orderToTest = new List<string>();
    }


    //序列化信息

    /// <summary>
    /// 一组UI的测试
    /// </summary>
    [Serializable]
    public class UITestGroupJson
    {
        public int UIId;
        public string UIName; //查找当前UI
        public List<AutoTestGroupJson> groupList = new List<AutoTestGroupJson>();
        public List<AutoTestInputJson> inputList = new List<AutoTestInputJson>();
    }

    [Serializable]
    public class AutoTestInputJson
    {
        public int id;
        public Vector3 position;
        [NonSerialized] public MonoBehaviour control;
    }

    [Serializable]
    public class AutoTestGroupJson
    {
        public int id;

        /// <summary>
        /// 拥有的Id列表 用来随机测试的
        /// </summary>
        public int[] ids; //拥有随机测试

        public List<OrderToTestJson> orderToTestList = new List<OrderToTestJson>(); //顺序测试
        public Vector3 position;

        [NonSerialized] public Dictionary<int, MonoBehaviour> controlDic = new Dictionary<int, MonoBehaviour>();
    }

    [Serializable]
    public class OrderToTestJson
    {
        public int weight;
        public int[] ids;
    }
}